package com.chen.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("news")
@SuppressWarnings("all")
public class News {

    @TableId(type = IdType.AUTO)
    private int id;
    private String title;
    private String content;
    private String author;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone = "GMT+8")//日期格式化
    private Date time;
    private String category;

    @TableField(exist = false)
    private String avatar;  //头像

    @TableField(exist = false)
    int count;

    private String img;


}
